Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 7 - Finder Interface Reference / Finder Interface Functions
Manipulating Folder Descriptors /


GetFolderTypes

NEW WITH MAC OS 8

Gets the folder types from the global descriptor list.

pascal OSErr GetFolderTypes (
                     UInt32 requestedTypeCount,
                     UInt32 *totalTypeCount,
                     FolderType *theTypes);
requestedTypeCount
On input, the number of folder types that can fit in the buffer pointed to by the theTypes parameter.
totalTypeCount
On output, a pointer to the total number of folder types in the list. The totalTypeCount parameter may produce a value that is larger or smaller than that of the requestedTypeCount parameter. If totalTypeCount is equal to or smaller than the value passed in for requestedTypeCount and the value produced by the theTypes parameter is non-nil, then all folder types were returned to the caller.
theTypes
On output, a pointer to a buffer containing a list of the folder types for the installed descriptors. You can step through the list and call GetFolderDescriptor for each folder type. You should usually pass a non-nil pointer to a buffer; you might pass nil only if you wanted to know the number of descriptors installed in the system's global list, rather than the actual folder types of those descriptors.
function result
A result code; see "Result Codes".
SPECIAL CONSIDERATIONS
Before calling the GetFolderType function, you must pass the selector gestaltFindFolderAttr to the Gestalt function. If the gestaltFolderDescSupport bit is set, GetFolderType is available.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998